const cinemasDao = require('../dao/cinemasDao');
//分页查询
module.exports.find = async function (cinemasObj, page) {
    return await cinemasDao.find(cinemasObj, page);
}
//根据条件查询所有
module.exports.findAll = async function (cinemasObj) {
    return await cinemasDao.findAll(cinemasObj);
}
//根据ID查询
module.exports.findById = async function (id) {
    try {
        return await cinemasDao.findById(id);
    } catch (err) {
        return {}
    }
}
//增加
module.exports.insert = async function (cinemas) {
    return await cinemasDao.insert(cinemas);
}
//修改
module.exports.update = async function (id, cinemas) {
    try {
        return await cinemasDao.update(id, cinemas);
    } catch (err) {
        return {}
    }
}
//删除
module.exports.delete = async function (id) {
    return await cinemasDao.delete(id);
}